package controller;

import java.awt.event.*;
import javax.swing.JOptionPane;
import model.GameClient;

public class ExitListener implements ActionListener{
	
	private GameClient gameClient;
	
	public ExitListener(GameClient gameClient)
	{
		super();
		this.gameClient = gameClient;
	}

	public void actionPerformed(ActionEvent e) 
	{
		int response = JOptionPane.showConfirmDialog(null,"Do you want to exit the game?", 
				"Exit Program??", JOptionPane.YES_NO_OPTION);
		if (response == JOptionPane.YES_OPTION)
			System.exit(0);
	}
}
